import Vue from 'vue'
import Vuex from 'vuex'
// import mutations from './mutations'
// import actions from './action'
// import getters from './getters'

Vue.use(Vuex)



export default new Vuex.Store({
	state:{
		userType:'vuex',
	},
	getters:{
		
	},
	actions:{
		actionsUserType({commit,state},type){
			return new Promise((resove,reject)=>{
				setTimeout(()=>{
					commit('setUserType',type)
					resove(type)
				},3000)
			})
		}
	},
	mutations:{
		setUserType(state,type){//
			// console.log(type)
			state.userType=type;
		}
	}
})